HTML - tags - samp tag

revision:


Content

"samp" tag : sample output from computer program/script syntax some examples


"samp" tag : sample output from computer program/script

top

The <samp> tag contains sample output from a computer program or a script. In the browser, the content of the tag is displayed in a monospace font, by default.
The <samp> tag is a phrase tag indicating that a text section has structural meaning.

The default font face of the browser can be overridden with a CSS rule for the "samp" tag. However, the browser's preferences may take priority over any specified CSS.

The <output> tag can be used instead of <samp>, if you want an element to serve as a container for the output created by the website or JavaScript code.

Attributes: the <samp> element supports the global attributes and events attributes.


syntax

top

<samp> . . . </samp>


some examples

top

You see an ordinary text here. But this is a sample text. And another ordinary text.

Codes:

                    <p class="spec">You see an ordinary text here. <samp>But this is a sample text.</samp> 
                    And another ordinary text.</p>  
                

I am trying to install a software on my system but it is continuously giving an error message:

Error 5: Access is denied.

Codes:

                    <p class="spec">I am trying to install a software on my system but it is continuously 
                    giving an error message: </p>  
                    <p class="spec"><samp>Error 5: Access is denied.</samp></p>